<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/common/meta.jsp" %>
<title>Insert title here</title>
<script type="text/javascript">
	$(document).ready(function(){
		$("#allorgtree a").click(nodeClick);
		//$("#allorgtree a").append(" <span ><span style='color:red'>添加</span> <span style='color:red'>删除</span></span>");
		});

	function nodeClick(){
		var href = $(this).attr("href");
		var name = $(this).text();
		var id = href.substr(href.indexOf("#")+1);
		$("#selectedOrgid").val(id);
		$("#currNode").text(name);
		}
</script>
</head>
<body>

<form id="pagerForm" method="post" action="${ctx }/sys/organization-ui!getAllOrgUL.action">

</form>

<div id="allorgtree" style=" float:left; display:block; margin:10px; overflow:auto; width:300px; height:95%; border:solid 1px #CCC; line-height:21px; background:#FFF;">
<ul class="tree treeFolder expand" >
	${ul }
</ul>
</div>
<div style="height:120;width:1;"></div>
<div class="formBar" style="text-align:center;">
<div style="width:300px;;height:100px;">
				<input type="hidden" name="selectedOrgid" id="selectedOrgid" value="">
				<div style="height:35px;line-height:35px;text-align:left;">当前节点：<b><span id="currNode" style="color:ff0000"></span></b></div>
	
			
				<div>
					<ul class="toolBar">
						<li>
								<a  class="add"  href="#" target="navTab" onclick="this.href='${ctx}/sys/organization!input.action?parentId='+$('#selectedOrgid').val()" title="添加节点">添加节点</a>
						</li>
						<li>
								<a class="delete" href="#" target="navTabTodo" onclick="this.href='${ctx}/sys/organization!delete.action?id='+$('#selectedOrgid').val();alertMsg.confirm('所有下级节点也同时被删除，且无法恢复！确定要删除吗？');" title="删除节点">删除节点</a>
						</li>
						<li>
								<a class="edit"  href="#" target="navTab" onclick="this.href='${ctx}/sys/organization!input.action?id='+$('#selectedOrgid').val()" title="修改节点">修改节点</a>
						</li>
					</ul>

				</div>
				


</div>
</div>
</body>
</html>